package com.yanqu.road.server.manger;

import com.yanqu.road.dao.cache.SqlCachePool;
import com.yanqu.road.server.TempMgr;

public class SqlCacheMgr extends TempMgr {

    public static void publicReloadData() {
        SqlCachePool.clearAllCache();
    }

    @Override
    public boolean save() {
        SqlCachePool.clearExpireCache();
        return true;
    }

    @Override
    public boolean init() throws Exception {
        SqlCachePool.setOpenCache(true);
        return true;
    }

    @Override
    public boolean reloadConfig() throws Exception {
        return true;
    }

    @Override
    public boolean reloadData() throws Exception {
        publicReloadData(); // 代码都放这里面方便调用
        return true;
    }

    @Override
    public boolean stop() {
        return true;
    }
}
